#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
Autor: Ricardo Isabel nº5140
Data: 15/02/2012
'''

import SimpleHTTPServer
import SocketServer
import webbrowser

'''
Cria o servidor http server e abre o browser em http://27.0.0.1:8000
'''
def http_server():
    Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
    httpd = SocketServer.TCPServer(('', 8000), Handler)        
    print "HTTP serving at port 8000"
    url = 'http://127.0.0.1:8000/'
    webbrowser.open(url)
    httpd.serve_forever()
    

